
import { Button, Form, Input, Select ,Badge} from 'antd';


export const AformConfig = [
    {
        type: "Input",
        lable: "类型",
        placenholder: "请输入搜索类型",
        key: "type",
    },
    {
        type: "Input",
        lable: "搜素词",
        placenholder: "请输入搜素词",
        key: "keyword",
    },
    {
        type: "Input",
        lable: "搜索量",
        placenholder: "请输入搜索量",
        key: "count",
    },
    {
        type: "Find",
        text: "收搜"
    },
    {
        type: "Reset",
        text: "重置"
    }

]



export const tableData = [
    {
        key: '1',
        name: 'John Brown',
        age: 32,
        address: 'New York No. 1 Lake Park',
        tags: ['nice', 'developer'],

    },
    {
        key: '2',
        name: 'Jim Green',
        age: 42,
        address: 'London No. 1 Lake Park',
        tags: ['loser'],
    },
    {
        key: '3',
        name: 'Joe Black',
        age: 32,
        address: 'Sidney No. 1 Lake Park',
        tags: ['cool', 'teacher'],
    },
    {
        title: 'Action',
        key: 'action',
    },
]

export const tableColumns = (
    PassCommrnt: (id: number, flag: boolean) => void,
    Recomment: (record: object) => void,
    DeleteComment: (id: number) => void) => {
    return [
        {
            title: '搜索词',
            dataIndex: 'keyword',
            key: 'keyword',
        },
        {
            title: '搜索量',
            dataIndex: 'count',
            key: 'count',
        },
        {
            title: '搜索时间',
            dataIndex: 'updateAt',
            key: 'updateAt',
        },
        {
            title: '操作',
            dataIndex: 'action',
            key: 'action',
            render: (_: any, record: any) => {
                // const id=record.id
                console.log(_, record)
                const id = record.id
                return (
                    // PassCommrnt: (id: number, flag: boolean) => void,
                    // Recomment: (record: object) => void,
                    // DeleteComment: (id: number) => void
                    <>
                        {/* <Button type='link' onClick={()=> PassCommrnt(id,true)}>编辑</Button>
                        <Button type='link'>发布</Button>
                        <Button type='link' onClick={()=>{Recomment(record)}}>查看访问</Button> */}
                        <Button type='link' onClick={()=>{DeleteComment(id)}}>删除</Button>
                    </>
                )
            }
        }
    ];

}
